var http = require('http');
var port = process.env.port || 1337;
http.createServer(function (req, res) {
    // console.log(req);
    let info = '';
    req.once("data",function(chunk){
        info += chunk;
    }).once("end",function(){
        console.log(info);
        res.writeHead(200, { 'Content-Type': 'text/plain' });
        res.end('Hello World\n');
    });
}).listen(port);
console.log("Server Started! Please visit http://127.0.0.1:" + port);